﻿using AMMVVMLibrary.Portable;
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ViewModels
{
    public class ItemPageViewModel :ViewModelBase
    {
        private string _PageName;
        public string PageName
        {
            get { return _PageName; }
            set
            {
                if (value == _PageName)
                {
                    return;
                }
                _PageName = value;
                OnPropertyChanged(() => PageName);
            }
        }

        private ColoredSquare _SelectedItem;
        public ColoredSquare SelectedItem
        {
            get { return _SelectedItem; }
            set
            {
                if (value == _SelectedItem)
                {
                    return;
                }
                _SelectedItem = value;
                OnPropertyChanged(() => SelectedItem);
            }
        }
        public ItemPageViewModel()
        {
            PageName = "Item Page";
        }
        public override void LoadData(object parameter)
        {
            SelectedItem = parameter as ColoredSquare;
        }
    }
}
